Change semantics of the draw signal
authorBenjamin Otte <otte@redhat.com>
Tue, 14 Sep 2010 14:42:16 +0000 (16:42 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 26 Sep 2010 13:11:42 +0000 (15:11 +0200)
commit45744d9a5fa4e51963a3abc1793cabdb51e42211
tree38853e6f18fcfbd2826ca7f794f531a94a74a31d
parent0acec382c8deacabac089b70131e6ea531f936e1
Change semantics of the draw signal

Previously, we tried to move the context's origin to the widget's top
left location, no matter what window the paint was happening on. Now we
only do that for child windows of the widget's window and leave the
context untouched for windows that the widget has created outside its
own hierarchy. In those casses, we also don't clip the context to
the widget's allocation.

Includes fixes to GtkHandlebox for this effect and fixes all known
issues with it.

These semantics assume that gtk_widget_draw() should only draw the parts
of a widget that are inside child windows and not draw stuff that is
located in completely different GdkWindows. In the handlebox case, it
means that it should only draw the handle when it is attached, but not
when it isn't. We'll likely need a special draw function for the
detached handlebox if we want to draw it.
gtk/gtkhandlebox.c
gtk/gtkwidget.c
gtk/gtkwidget.h